<template>
    <router-view v-slot="{ Component }">
        <transition name="router-fade" mode="out-in"> <!--如果使用transition，那么其他的组件还是需要根div-->
            <keep-alive include="aasdasda">
                <component :is="Component"/>
            </keep-alive>
        </transition>
    </router-view>
</template>

<script lang='ts'>
import { defineComponent } from 'vue'
import { useStore } from '@/store/index';
export default defineComponent({
    setup:()=>{
        //const store = useStore()
        //console.log(store.state.routesList.routesList);
        //store.dispatch('userInfos/test')
    }
})
</script>
<style lang="scss" scoped>
.router-fade-enter-active, .router-fade-leave-active {
    transition: opacity .3s;
}
.router-fade-enter, .router-fade-leave-active {
    opacity: 0;
}
</style>